package com.junlinpro.utils;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Component;

@Component
public class CardStateUtil {
	
	// 储存采集卡状态
	private Map<String, Integer> cardState = new HashMap<>();

    // 储存采集卡状态
    public void cardStateAdd(String cardId) {
        // 可以放在Map中或其他地方
    	cardState.put(cardId, 1); //1正在监听
    }

    // 获得采集卡状态
    public Integer cardStateGet(String cardId) {
        //从保存状态的地方获取
        return cardState.get(cardId);
    }
    
    public void cardStateRemove(String cardId) {
    	cardState.remove(cardId);
    }

}
